﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyDoanVien.Bussiness;
using QuanLyDoanVien.DataLayer;
using DevComponents.DotNetBar.Controls;

namespace QuanLyDoanVien.Controller
{
    class ChucVuCtrl
    {
        ChucVuInfo m_ChucVuInfo = new ChucVuInfo();
        ChucVuData m_ChucVuData = new ChucVuData();

        public List<ChucVuInfo> Lay_DS_ChucVu()
        {
            return m_ChucVuData.Lay_DS_ChucVu();
        }
        public void HienThiComboBox(ComboBoxEx cbx)
        {
            cbx.DataSource = m_ChucVuData.Lay_DS_ChucVu();
            cbx.DisplayMember = "TenChucVu";
            cbx.ValueMember = "MaChucVu";
        }
        public String getAutoId()
        {
            return m_ChucVuData.getAutoID();
        }
        #region Them
        public void ThemChucVu(ChucVuInfo cv)
        {
            m_ChucVuData.LuuChucVu(cv);
        }
        #endregion
        #region Xoa
        public bool XoaChucVu(String macv)
        {
            return m_ChucVuData.XoaChucVu(macv);
        }
        #endregion 
        #region Sua
        public bool SuaChucVu(ChucVuInfo cv)
        {
            return m_ChucVuData.SuaChucVu(cv);
       }
        #endregion
    }
}
